"use strict";
cc._RF.push(module, 'a4d70mpFANIT4M7OGmkVOnX', 'NumberBox');
// ts/NumberBox.ts

Object.defineProperty(exports, "__esModule", { value: true });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var NumberBox = (function (_super) {
    __extends(NumberBox, _super);
    function NumberBox() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.numText = null;
        _this.num = 0;
        _this.x = 0;
        _this.y = 0;
        _this.game = null;
        _this.n_x = 0;
        _this.n_y = 0;
        return _this;
    }
    NumberBox.prototype.set_text = function (num) {
        this.num = num;
        this.numText.string = String(num);
        if (num > 25) {
            this.node.color = new cc.Color(45, 75, 142, 255);
            this.node.runAction(cc.sequence(cc.scaleTo(0.15, 1.5), cc.scaleTo(0.15, 1)));
        }
        else {
            this.node.color = new cc.Color(59, 91, 160, 255);
        }
    };
    NumberBox.prototype.onLoad = function () {
        var _this = this;
        this.n_x = this.node.x;
        this.n_y = this.node.y;
        this.node.on(cc.Node.EventType.TOUCH_START, function (event) {
            _this.game.number_click(_this.x, _this.y);
        });
    };
    NumberBox.prototype.setArrPosition = function (x, y) {
        this.x = x;
        this.y = y;
    };
    __decorate([
        property(cc.Label)
    ], NumberBox.prototype, "numText", void 0);
    NumberBox = __decorate([
        ccclass
    ], NumberBox);
    return NumberBox;
}(cc.Component));
exports.default = NumberBox;

cc._RF.pop();